import logging

import requests
from config import ihrm_url
from ihrm_log import init_log_config

def Ihrm_token():
    url = f'{ihrm_url}/api/sys/login'
    headers = {
        "Content-Type":"application/json"
    }
    json = {
        "mobile": "13800000002",
        "password": "123456"
    }
    res = requests.post(url=url, headers=headers, json=json)
    schem
    token = res.json().get('data')
    # try:
    #     res = requests.post(url=url, headers=headers, json=json)
    #     token = res.json().get('data')
    #     init_log_config()
    #     logging.info(token)
    # except Exception as e:
    #     init_log_config()
    #     logging.error(e)

Ihrm_token()
